home *** CD-ROM | disk | FTP | other *** search
/ Eagles Nest BBS 4 / Eagles_Nest_Mac_Collection_Disc_4.TOAST / Spreadsheets & Statistics / WingZ11a#3 / TF (.txt) < prev   
Wingz Script  |  1989-02-08  |  11KB  |  415 lines

  1. WNGZWZSC01b1
  2. Type in Chart Number
  3. Type in Series Number
  4. Show Notes
  5. Hide Notes
  6. Show Notes
  7. Hide Notes
  8. Show Graph
  9. Hide Graph
  10. Object number?
  11. Object location?
  12. Test Flight
  13. Test Flight
  14. gfffff
  15. call tf:drivedo()
  16. Hard Disk System
  17. Two Floppy Drive System
  18. call tf:graydrivename()
  19. Your Disk Drive Configuration:
  20. )TEST FLIGHT BETA - Version 1.O - 12/27/88
  21. 'TEST FLIGHT
  22.   -  Version 1.O  -  2/8/89
  23.  Copyright 1989, Informix Software, Inc.
  24. All Rights Reserved.
  25. computer
  26. desk2
  27. deskse
  28. tffolder
  29. scriptfolder
  30. dgask
  31. drive2name
  32. harddisk
  33. drivebutton
  34. SH1101
  35. SH1102
  36. SH2101
  37. SH2102
  38. SH2103
  39. SH2104
  40. TFdir
  41. SHdir
  42. macIIh
  43. macIIv    
  44. macSEh
  45. macSEv
  46. screenH
  47. screenV
  48. computer
  49. nseries
  50. nchart
  51. nobject
  52. notes
  53. objloc
  54. locx1
  55. locy1
  56. locx2
  57. locy2
  58. wscale
  59. screenwidth
  60. screenheight
  61. bottomborder
  62. aspect
  63. xoffset
  64. yoffset
  65. toolstate
  66. doit!
  67. icalc#    
  68. artnotes$
  69. sheetfolder%
  70. first&
  71. drive2name'    
  72. harddisk(
  73. drivebutton)
  74. fontsloaded*
  75. play+    
  76. tffolder,    
  77. tfloaded-
  78. scriptfolder.    
  79. TFmerge
  80. deskinit
  81. machineinit
  82. TFOpen
  83. TFGetScript{
  84. gowindow
  85. gowindowcalc+
  86. goback
  87. WindowIn
  88. SelectSeries
  89. ShowNote
  90. ShowNotePnt]
  91. ShowGraphP
  92. desk2*
  93. deskSE
  94. location
  95. getobjloc
  96. tooltoggle
  97. drivedo
  98. graydrivename
  99. getdrivez
  100. tfnoticeI
  101. define SH1101, SH1102, SH2101, SH2102, SH2103, SH2104
  102. define TFdir, SHdir
  103. define macIIh, macIIv, macSEh, macSEv, screenH, screenV, computer
  104. define nseries, nchart, nobject
  105. define notes, objloc
  106. define locx1, locy1, locx2, locy2
  107. define wscale, screenwidth, screenheight, bottomborder, aspect
  108. define xoffset, yoffset, toolstate
  109. define b1, doit, dn, icalc, artnotes
  110. define sheetfolder, first, drive2name, harddisk, drivebutton
  111. define fontsloaded, play, tffolder, tfloaded, scriptfolder
  112. function TFmerge(file)
  113.     return TFdir & file
  114. end function
  115. function deskinit()
  116.     screenwidth = deskright()
  117.     screenheight = deskbottom()
  118.     if computer = 0
  119.         if screenwidth >= 12780
  120.             computer = 1
  121.         else
  122.             computer = 2
  123.         end if
  124.     end if
  125.     if computer = 1
  126.         yoffset = 575
  127.         screenheight = 7510
  128.         wscale = 100%
  129.     elseif computer = 2
  130.         wscale = 75%
  131.         xoffset = 240
  132.         screenwidth = 9600
  133.         screenheight = 6420
  134.     end if
  135.     return computer
  136. end function
  137. function machineinit(n)
  138.     TF:computer = n
  139. end function
  140. function TFOpen(wname,dorepaint)
  141.     if computer = 1 or computer = 2
  142.         if dorepaint = 1
  143.             repaint off
  144.         end if
  145.         open drive2name & tffolder & sheetfolder & ":" & wname
  146.         if computer = 1
  147.             call tf:desk2()
  148.         end if
  149.         if computer = 2
  150.             call tf:deskse()
  151.         end if
  152.         unselect
  153.         tool sheet
  154.         if dorepaint = 1
  155.             repaint window
  156.             repaint on
  157.         end if
  158.     end if
  159. end function
  160. function TFGetScript(wname)
  161.     if computer = 1 or computer = 2
  162.         if tf:tffolder = "" and tf:scriptfolder = ""
  163.             get script wname
  164.         else
  165.             get script drive2name & tffolder & scriptfolder & ":" & wname
  166.         end if
  167.     end if
  168. end function {TFGetScript}
  169. function gowindow(sheetname,dorepaint)
  170.     if dorepaint = 1
  171.         repaint off
  172.     end if
  173.     go to window drive2name & tffolder & sheetfolder & ":" & sheetname
  174.     unselect
  175.     tool sheet
  176.     if dorepaint = 1
  177.         repaint window
  178.         repaint on
  179.     end if
  180. end function {gowindow}
  181. function gowindowcalc(sheetname,dorepaint)
  182.     if dorepaint = 1
  183.         repaint off
  184.     end if
  185.     go to window drive2name & tffolder & sheetfolder & ":" & sheetname
  186.     recalc
  187.     unselect
  188.     tool sheet
  189.     if dorepaint = 1
  190.         repaint window
  191.         repaint on
  192.     end if
  193. end function {gowindowcalc}
  194. function goback(filename,dorepaint)
  195.     if dorepaint = 1
  196.         repaint off
  197.     end if
  198.     close now
  199.     go to window drive2name & tffolder & sheetfolder & ":" & filename
  200.     unselect
  201.     tool sheet
  202.     if dorepaint = 1
  203.         repaint window
  204.         repaint on
  205.     end if
  206. end function {go back}
  207. function WindowIn()
  208.     if computer = 1
  209.         call tf:desk2()
  210.     end if
  211.     if computer = 2
  212.         call tf:deskse()
  213.     end if
  214. end function {Window In}
  215. function SelectSeries()
  216.     nchart = dg:dgask("Type in Chart Number",nchart,6)
  217.     nseries = dg:dgask("Type in Series Number",nseries,6)
  218.     select chart value(nchart) series value(nseries)
  219. end function
  220. function ShowNote(objnum,statenum)
  221. define n
  222. n = statenum
  223. if n = 1
  224.     repaint off
  225.     hide notes
  226.     select object objnum
  227.     show control name "Show Notes"
  228.     unselect
  229.     repaint window
  230.     repaint on
  231. elseif n = 0
  232.     repaint off
  233.     show notes
  234.     select object objnum
  235.     show control name "Hide Notes"
  236.     unselect
  237.     repaint objects
  238.     repaint on
  239. end if
  240. if statenum = 1
  241.     n = 0
  242. elseif statenum = 0
  243.     n = 1
  244. end if
  245. return n
  246. end function {ShowNote}
  247. function ShowNotePnt(buttonnum,fieldnum,statenum)
  248. define n
  249. n = statenum
  250. if n = 1
  251.     repaint off
  252.     hide notes
  253.     select object buttonnum
  254.     show control name "Show Notes"
  255.     unselect
  256.     repaint window
  257.     repaint on
  258. elseif n = 0
  259.     repaint off
  260.     show notes
  261.     select object buttonnum
  262.     show control name "Hide Notes"
  263.     unselect
  264.     repaint object buttonnum
  265.     repaint object fieldnum
  266.     unselect
  267.     repaint on
  268. end if
  269. if statenum = 1
  270.     n = 0
  271. elseif statenum = 0
  272.     n = 1
  273. end if
  274. return n
  275. end function {ShowNotePnt}
  276. function ShowGraph(objnum,statenum)
  277. define n
  278. n = statenum
  279. if n = 1
  280.     repaint off
  281.     hide graphics
  282.     select object objnum
  283.     show control name "Show Graph"
  284.     unselect
  285.     repaint window
  286.     repaint on
  287. elseif n = 0
  288.     repaint off
  289.     show graphics
  290.     select object objnum
  291.     show control name "Hide Graph"
  292.     unselect
  293.     repaint objects
  294.     repaint on
  295. end if
  296. if statenum = 1
  297.     n = 0
  298. elseif statenum = 0
  299.     n = 1
  300. end if
  301. return n
  302. end function {Show Graph}
  303. function desk2()
  304.     define woffset
  305.     wscale = 1.0
  306.     woffset = 575
  307.     screenwidth = 12780
  308.     screenheight = 7510
  309.     window scale wscale
  310.     window size (screenwidth,screenheight+woffset)
  311.     window location (0,woffset)
  312. end function {deskII}
  313. function deskSE()
  314.     define woffset
  315.     wscale = .75
  316.     woffset = 240
  317.     screenwidth = 9600
  318.     screenheight = 6420
  319.     window scale wscale
  320.     window size (screenwidth+woffset,screenheight)
  321.     window location (woffset,0)
  322. end function {deskSE}
  323. function location(obj,loc)
  324.     repaint off
  325.     select object obj
  326.     object location range(loc)
  327.     unselect
  328.     repaint on
  329.     return loc
  330. end function
  331. function getobjloc()
  332.     nobject = dg:dgask("Object number?", nobject, 6)
  333.     objloc = dg:dgask("Object location?", objloc, 12)
  334.     select object value(nobject)
  335.     object location objloc
  336.     unselect
  337.     return objloc
  338. end function
  339. function tooltoggle()
  340.     if toolstate = 0
  341.         toolstate = 1
  342.     elseif toolstate = 1
  343.         toolstate = 0
  344.     else
  345.         toolstate = 0
  346.     end if
  347. end function {tooltoggle}
  348. function drivedo()
  349.     tf:doit = 1
  350.     if drivebutton = 2
  351. {        tf:drive2name = ctstring(3,0) }
  352.         tf:drive2name = "Test Flight"
  353.     end if
  354. end function {drivedo}
  355. function graydrivename()
  356.     define t
  357.     t = ctvalue(2,1)
  358.     if t = 0
  359.         tf:harddisk = 0
  360.         tf:drivebutton = 2
  361.         tf:drive2name = "Test Flight"
  362.         select control 3
  363.         ungrey control
  364.         repaint control
  365.     else
  366.         tf:harddisk = 1
  367.         tf:drivebutton = 1
  368.         tf:drive2name = ""
  369.         select control 3
  370.         grey control
  371.         repaint control
  372.     end if
  373. end function {graydrivename}
  374. function getdrive()
  375.     define dbx, dby
  376.     tf:doit = 0
  377.     dbx = 0.0
  378.     dby = .7
  379.     new modal dialog box at (-1, -1) (4.6 inch, 3 inch)
  380.     add push button "OK@" at ((3.5 + dbx) inch, (1.8 + dby) inch) +(.6 inch, .3 inch)
  381.     dialog default push button
  382.     script "call tf:drivedo()"
  383.     add radio button "Hard Disk System", "Two Floppy Drive System" at 
  384.         ((.25 + dbx) inch, (.75 + dby) inch) +(4 inch, .75 inch)
  385.     script "call tf:graydrivename()"
  386.     radio button drivebutton
  387.     add text "Your Disk Drive Configuration:" at 
  388.         ((.25 + dbx) inch, (.25 + dby) inch) +(4.25 inch, .3 inch)
  389.     no line border
  390.     add text "TEST FLIGHT BETA - Version 1.O - 12/27/88" at
  391.         (.25 inch, .25 inch) +(4.25 inch, .3 inch)
  392.     no line border
  393.     use dialog box
  394. end function {getdrive}
  395. function tfnotice()
  396.     define dbx, dby
  397.     dbx = 0
  398.     dby = 0
  399.     new modal dialog box at (-1, -1) (4.6 inch, 2 inch)
  400.     add push button "OK@" at ((3.5 + dbx) inch, (1.5 + dby) inch) +(.6 inch, .3 inch)
  401.     dialog default push button
  402.     add text "TEST FLIGHT
  403.   -  Version 1.O  -  2/8/89" at
  404.         (.3 inch, .3 inch) +(4.25 inch, .3 inch)
  405.     no line border
  406.     add text "
  407.  Copyright 1989, Informix Software, Inc." at
  408.         (.3 inch, .75 inch) +(4.25 inch, .3 inch)
  409.     no line border
  410.     add text "All Rights Reserved." at
  411.         (.3 inch, 1.05 inch) +(4.25 inch, .3 inch)
  412.     no line border
  413.     use dialog box
  414. end function {tfnotice}
  415.